package com.lemon.smartsafety.rayeye.util;

/**
 * Created by Cooliean on 16/4/17.
 */
public class TypeUtils {
    public static RayType getTypeById(RayType.ListType listType, int index) {
        RayType type = null;
        if (listType == RayType.ListType.FAULT) {
            switch (index) {
                case 0: {
                    type = RayType.FaultItemType.NOT_CONFIRM;
                    break;
                }
                case 1: {
                    type = RayType.FaultItemType.WU_YE_REPAIR;
                    break;
                }
                case 2: {
                    type = RayType.FaultItemType.IGNORED;
                    break;
                }
                case 3: {
                    type = RayType.FaultItemType.REPAIRING;
                    break;
                }
                case 4: {
                    type = RayType.FaultItemType.BLOCKED;
                    break;
                }
                case 5: {
                    type = RayType.FaultItemType.REPAIRED;
                    break;
                }
            }
        }else if (listType == RayType.ListType.FIRE) {
            switch (index) {
                case 0: {
                    type = RayType.FireItemType.NOT_HANDLE;
                    break;
                }
                case 1: {
                    type = RayType.FireItemType.CONFIRM;
                    break;
                }
                case 2: {
                    type = RayType.FireItemType.IGNORED;
                    break;
                }
            }
        }

        return type;
    }
}
